#include "libGeoutils/tool/uuid_tool.h"
#include "Poco/UUIDGenerator.h"
#include "Poco/UUID.h"

geo::tool::UUID_Identifier::UUID_Identifier()
{
    mUUid = CreateUUID();
}

geo::tool::UUID_Identifier::~UUID_Identifier()
{
}

std::string geo::tool::UUID_Identifier::uuid() const
{
	return mUUid;
}

geo::tool::UUID_Identifier::operator std::string() const
{
	return mUUid;
}

std::string geo::tool::UUID_Identifier::CreateUUID()
{
    Poco::UUIDGenerator& uuid_generator = Poco::UUIDGenerator::defaultGenerator();
    Poco::UUID poco_uuid = uuid_generator.create();
    return poco_uuid.toString();
}
